#ifndef SCENARIOPANEL_H_
#define SCENARIOPANEL_H_

#include "../../common/utils/Logger.h"

#include "../../persistencia/Persistor.h"
#include "../Surface.h"
#include "../Widget.h"
#include "Container.h"
#include "../ScenarioElement.h"
#include "../../common/lib/SDL_rotozoom.h"

#include <list>

class ScenarioPanel: public Container {

public:

	ScenarioPanel(std::string scenarioName, int xPos, int yPos, Widget* parent);

	virtual ~ScenarioPanel();

	virtual void handleEvent(Event event);

	virtual void resolve();

	virtual void showOn(SDL_Surface* surface);

	std::string getScenarioName() const;

	void save();

	void updateBackground(std::string background);

protected:

	SDL_Surface* panel;

	std::stringstream logging;

	std::string scenarioName;
	std::string background;
	std::list<ScenarioElement*> elements;

	//Tener un iterador como atributo esta mal..
	std::list<ScenarioElement*>::iterator element_it;

	void setElements(std::list<ScenarioElement*> scenaryElements);


private:
	void resize(int w, int h);

};

#endif /* SCENARIOPANEL_H_ */
